Set head flag of request

ABSTRACT

A request is output to a first queue of a storage device. A head flag of the request is set based on whether the request is a read type request and a comparison of a percentage of requests queued at the first queue that are read type requests to a threshold percentage. The storage device is to store the request at a head of the first queue if the head flag of the request is set.

BACKGROUND

Storage device controllers may receive a request from a host, such as aread request or a write request, and output the request to the storagedevice. The storage device may receive and queue up a plurality of thereceived requests. Thus, there may be a latency for processing the readand write requests.

BRIEF DESCRIPTION OF THE DRAWINGS

The following detailed description references the drawings, wherein:

FIG. 1 is an example block diagram of a device to set a head flag of arequest to a storage device;

FIG. 2 is another example block diagram of a device to set a head flagof a request to a storage device;

FIGS. 3A and 3B are example block diagrams of the first and secondqueues of FIG. 2.

FIG. 4 is an example block diagram of a computing device includinginstructions for setting a head flag of a request to a storage device;and

FIG. 5 is an example flowchart of a method for setting a head flag of arequest to a storage device.

DETAILED DESCRIPTION

Specific details are given in the following description to provide anunderstanding of examples of the present techniques. However, it will beunderstood that examples of the present techniques may be practicedwithout these specific details. For example, systems may be shown inblock diagrams in order not to obscure examples of the presenttechniques in unnecessary detail. In other instances, well-knownprocesses, structures and techniques may be shown without unnecessarydetail in order to avoid obscuring the examples of the presenttechniques.

In many cases, read latency may be more important to a host (or user atthe host) than write latency. Read latency may refer to an amount oftime consumed by a storage device to process a read request of the hostand write latency may refer to an amount of time consumed by a storagedevice to process a write request of the host. This is generally becausethe host may wait for the read data to arrive, whereas the host mayrarely wait after the write request is sent because the write request isusually cached in an operating system (OS) of the host and/or a memoryof storage device controller that interfaces between the storage deviceand the host.

Storage devices may prioritize write requests over read requests. Thus,if a plurality of write requests, such as 10, are outstanding to thestorage device, a pending read request will often be deferred, such asby a second or more, as the storage device prioritizes the plurality ofincoming write requests ahead of the single waiting read request.

Further, there may be no suitable Small Computer System Interface (SCSI)task attribute to reduce the read latency. Also, “Ordered” queuing maycause an unacceptably large drop in performance due to missedrevolutions for a drive of the storage device. Moreover, constrictingqueue depths would also cause a substantially large reduction in randomInput/output processes (IOPs).

Examples of present techniques may improve read request latency withoutsubstantially affecting write request latency. For example, a device mayinclude an interface unit and a controller. The interface unit mayreceive a first request from a host. The controller may output the firstrequest to a first queue of a storage device. The controller may set ahead flag of the first request if the first request is a read typerequest and a percentage of requests queued at the first queue that areread type requests is less than a threshold percentage. The storagedevice may store the first request at a head of the first queue if thehead flag of the first request is set. Thus, examples may allow for readrequests to be prioritized over write requests when a percentage of theoutstanding requests that are read requests is below a thresholdpercentage.

Referring now to the drawings, FIG. 1 is an example block diagram of adevice 100 to set a head flag 124 of a request to a storage device 150.The device 100 may couple to or be included in any type of computingdevice or controller that interfaces with a memory, such as a securemicroprocessor, a storage device controller, a notebook computer, adesktop computer, an all-in-one system, a server, a network device, awireless device and the like. In the example of FIG. 1, device 100interfaces with a host 140 and the storage device 150. For example, thedevice 100 may communicate with the storage device 150 via a SerialAttached SCSI (SAS) connection and may communicate with the host 140 viaa Peripheral Component Interconnect (PCI) connection, Ethernet or IPprotocol connection.

The host 140 may refer to any type of device that seeks to access thestorage device 150, such as a main processor of a computer or a computerconnected to a computer network. The storage device 150 may be anyelectronic, magnetic, optical, or other physical storage device thatstores data, such as a hard disk drive (HDD), solid-state drive (SSD)and the like. For example the storage device 150 may include one or morephysical drives (not shown) and one or more logical data volumesspanning one or more of the drives.

In FIG. 1, the device 100 is shown to include an interface unit 110 andcontroller 120. The interface unit and controller 110 and 120 mayinclude, for example, a hardware device including electronic circuitryfor implementing the functionality described below, such as controllogic and/or memory. In addition or as an alternative, the interfaceunit and controller 110 and 120 may be implemented as a series ofinstructions encoded on a machine-readable storage medium and executableby a processor.

The interface unit 110 may receive a first request from the host 140.For example, the first request may a read request requesting to readdata from the storage device 150 or a write request requesting to writedata to the storage device 150. The controller 120 may output the firstrequest to a first queue 160 of the storage device 150. The first queue160 may be a physical region of the storage device 150 used totemporarily store data while it is being moved from one place toanother, e.g. from the device 100 to a disc or drive (not shown) of thestorage device 150. The first queue 160 may have a type of datastructure in order to arrange the a plurality of incoming requests, suchas a First-In-First-Out (FIFO) data structure or a LBA-sorted ElevatorQueue data structure. In FIG. 1, the first queue 160 may have a FIFOstructure, with a request entering a tail 162-n (where n is a naturalnumber) of the first queue 160 and progressing towards a head 162-1 ofthe first queue 160, at which point the request may leave the firstqueue 160.

The controller 120 may set a head flag 124 of the first request if thefirst request is a read type request and a percentage of requests 126queued at the first queue 160 that are read type requests is less than athreshold percentage 122. For example, the first request may be a packetincluding data (or payload) and control information, such as a header ortrailer. The head flag 124 may be part of the control information, wherethe head flag 124 is already present in the control information of thefirst request when received by the device 100, and/or encapsulatedtherein when output by the controller 120 to the storage device 150.

The percentage of requests 126 queued at the first queue 160 that areread type requests may relate to a ratio or percentage of read requeststo total requests outstanding at the first queue 160. For example, ifthere are a total of 3 read requests and 7 write requests stored at thefirst queue 160, the percentage of requests 126 queued at the firstqueue 160 that are read type requests may be 30%. A calculation for thepercentage of requests 126 queued at the first queue 160 that are readtype requests is explained in more detail below with respect to FIG. 2.The threshold percentage 122 may be determined, for example, empiricallyand/or according to an administrator's or user's preference. Forinstance, if the threshold percentage is 50% and the percentage ofrequests 126 queued at the first queue 160 that are read type requestsis 30%, then the controller 120 will set the head flag 124 of the firstrequest.

The controller may instead reset the head flag 124 of the first requestif the percentage of requests queued at the first queue that are readtype requests 126 is greater than or equal to the threshold percentage122. The controller may also reset the head flag 124 of the firstrequest, if the first request is not the read type request. Conversely,the head flag 124 may be reset by default. Therefore, the controller 120may only selectively set the head flag 124 for the reasons describedabove. Resetting the head flag 124 may relate to writing a zero to afield of the control information of the first request and setting thehead flag 124 may relate to writing a one to the same field of the firstrequest, or vice versa.

The storage device 150 may store the first request at the head 162_1 ofthe first queue 160 if the head flag 124 of the first request is set. Onthe other hand, the storage device 150 may store the first request at atail 162 _(—) n of the first queue 160 if the head flag 124 of the firstrequest is reset. As explained above, the head 162_1 is processed nextby storage device 150 and the tail 162 _(—) n is processed last by thestorage device 150 from the requests stored at the first queue 160. Forinstance, if the first queue 160 includes a plurality of write requests,the first request that is a read request will be placed at the head162_1 of the first queue 160 and thus processed before the plurality ofwrite requests in the first queue 160.

Nonetheless, the storage device 150 may be free to rearrange requestswithin the first queue 160 that have the head flag 124 reset. Forexample, the storage device 150 may not process the requests in FIFOorder but instead attempt to rearrange the requests that have the headflag reset, to optimize a number of requests-per-second that areprocessed. In one example, the requests may include an ordered queuingflag that prevents the requests from being rearranged, if the orderedqueuing flag is set.

FIG. 2 is another example block diagram of a device 200 to set a headflag 124 of a request to a storage device 150. The device 200 may coupleto or be included in any type of computing device or controller thatinterfaces with a memory, such as a secure microprocessor, a storagedevice controller, a notebook computer, a desktop computer, anall-in-one system, a server, a network device, a wireless device and thelike.

The device 200 of FIG. 2 may include at least the functionality and/orhardware of the device 100 of FIG. 1. For example, the device 200 ofFIG. 2 includes the interface unit 110 and the controller 120 of thedevice 100 of FIG. 1. The device 200 further includes a second queue 230and a counter 240. Similar to FIG. 1, the device 200 also interfaceswith the host 140 and the storage device 150.

The counter unit 240 may include, for example, a hardware deviceincluding electronic circuitry for implementing the functionalitydescribed below, such as control logic and/or memory. In addition or asan alternative, the counter 240 may be implemented as a series ofinstructions encoded on a machine-readable storage medium and executableby a processor.

The second queue 230 may be a region of a physical memory storage area(not shown) of the device 200 used to temporarily store requests whilebeing moved from one place to another, e.g. from the device 200 to thestorage device 150. Similar to the second queue 160, the first queue 230may have a type of data structure that allows for a plurality ofincoming requests to be arranged in an ordered manner, such as the FIFOdata structure.

The counter 240 may count a first number 242 of read type requestsoutstanding at the first queue 160 of the storage device 150. Thecounter 240 may also count a second number 244 of both read type andnon-read type requests outstanding at the first queue 160 of the storagedevice 150. The percentage 126 of requests queued at the first queue 160that are read type requests may be based on the first and second numbers242 and 244. For example, assume the first number 242 is 3, indicatingthat 3 read requests are outstanding at the first queue 160, and thesecond number 244 is 10, indicating that a combination of 10 read andnon-read (e.g. write) requests are outstanding at the first queue 160.The percentage 126 of requests queued at the first queue 160 that areread type requests may then be calculated based on a proportion betweenthe first and second numbers 242 and 244, such as 3/10 or 30%.

The counter 240 may increment the first number 242 if the controller 120outputs the read type request to the first queue 160 and may incrementthe second number 244 if the controller 120 outputs the read typerequest or the non-read type request to the storage device 150, such asthe first queue 160. For example, assume the controller 120 outputs 1read request, followed by 5 write requests, and then 1 read request.During this period, the counter 240 may increment the first number 242twice (for the two 2 read requests) and increment the second number 244seven times (for each of the read and write requests). Thus, if both thefirst and second numbers 242 and 244 were 0 before this period, thefirst and second numbers 242 and 244 would respectively be 2 and 7 afterthis period.

However, counter 240 may also decrement the first or second number 242and 244 during this period or any other period. For example, the counter240 may decrement the first number 242 if the storage device 150 outputsa first type acknowledgment to the device 200 and decrement the secondnumber 244 if the storage device 150 outputs the first typeacknowledgement or a second type acknowledgment to the device 200. Thestorage device 150 may output the first type acknowledgement to indicatethat a read type request has left the first queue 160 and output thesecond type acknowledgment to indicate that a non-read type request hasleft the first queue 160.

The counter 240 may also a count a third number 246 that tallies anumber of outstanding requests that have the head flag 124 set. Forinstance, the counter 240 may increment the third number 246 each time arequest with the head flag 124 set is output by the device 200 to thestorage device 150. Further, the counter 240 may decrement the thirdnumber 246 each time the storage device 150 outputs a third typeacknowledgment. The storage device 150 may output the third typeacknowledgment each time a request having the head flag 124 set leavesthe first queue 160. In one example, the controller 120 may stop sendingrequests to the storage device 150, if the third number 246 reaches athreshold number 220, such as 2. Thus, in this case, the controller 120may hold subsequent requests, such as at the second queue 230, until thenumber of outstanding requests with the head flag 124 set at the firstqueue 160 is less than the threshold number 220.

The controller 120 may receive and output a plurality of requests to thestorage device 150. For example, the controller 120 may receive a secondrequest from the host 140 after the first request. The controller 120may output the second request to a tail 232 _(—) m (where m is a naturalnumber) of the second queue 230 if the second request is not a read typerequest and the first queue 160 has capacity to store only oneadditional request. This is because if the controller 120 receives arequest, sets the head flag 124 of that request and outputs that requestto the storage device 150, the storage device 150 would be unable tomove that request to the head 162_1 of the first queue 160 if the firstqueue 160 was already full. While FIG. 2 describes the controller 120 asonly leaving space for one additional request at the first queue 160,embodiments of the controller 120 may leave space for more than requestat the first queue 160. Thus, the controller 120 may hold back anon-read type request if the first queue 160 is at near capacity.

Further, the controller 120 may reset a head flag 124 of the secondrequest and output the second request to the second queue 230 even whenthe second request is a read type request, if the percentage 126 ofrequests queued at the first queue 160 that are read type requests isgreater than or equal to the threshold percentage 122 and the firstqueue 160 has capacity to store only one additional request. This isbecause an other request may still be received by the controller 120when the percentage 126 of requests queued at the first queue 160 thatare read type requests is less than the threshold percentage 122 and thefirst queue 160 still only has capacity to store only one additionalrequest. In this case, as described above, the controller 120 wouldoutput the other request to the storage device 150 with its head flag124 set.

In addition, the controller 120 may set the head flag 124 of the secondrequest and output the second request to a head 230_1 of the secondqueue 230 if the second request is the read type request and the head162_1 of the first queue 160 holds the first request that is the readtype request. The controller 120 may then output the second request tothe storage device 150 after the first request is output from the head162_1 of the first queue 160 of the storage device 150, if thepercentage 126 of requests queued at the first queue 160 that are readtype requests is less than the threshold percentage 122.

The storage device 150 may store the second request at the head 162_1 ofthe first queue 160 if the head flag 124 of the second request is setand may store the second request at the tail 162 _(—) n of the firstqueue 160 if the head flag 124 of the second request is reset. Thus, asituation may be avoided where more than one request with the head flag124 set is present within the first queue 160. Otherwise, requests maybe processed out-of-order, such as if a newer request with the head flag124 set was placed ahead of an older request with the head flag 124 set.The controller 120 may be able to determine whether there is more thanone request with the head flag 124 set based on the third number 246.

FIGS. 3A and 3B are example block diagrams of the first and secondqueues 160 and 230 of FIG. 2. In FIG. 3A, the first queue 160 is shownto initially include only a plurality of write requests 162_2 to 162_(—) n−1, with a last spot 162 _(—) n of the first queue 160 empty, sothat the first queue 160 may have room to store an incoming readrequest. Then, the first request (which is a read type request) with itshead flag set is shown to be output by the controller 120 and stored ata head 162_1 of the first queue 160. As a result, all the write requestsare shifted back one spot so that the write request previously at thehead 162_1 is now at a second spot 162_2 and the last spot 162 _(—) n isnow filled with the write request that was previously at the next tolast spot 162 _(—) n−1. Hence, as a result of the setting the head flagof the first request, the first request will be processed before all thewrite requests. Otherwise, if the head flag of the first request hadbeen reset, the first request would have been placed at the tail 162_(—) n of the first queue 160 and processed after all of the writerequests.

In FIG. 3B, both the first and second queues 160 and 230 are shown.Here, initially the first queue 160 already has a first request that isa read type request at the head 162_1 of the first queue 160. Therefore,the controller 120 sets the head flag of a second request that is a readrequest and stores the second request at a head 232_1 of the secondqueue 230. Then, at a time after the first request has left the firstqueue 160, the storage device 150 may send an acknowledge signal, suchas the first type acknowledgment, to the controller 120. In turn, thecontroller 120 may output the second request from the head 232_1 of thesecond queue 230 to the first queue 160 of the storage device 150. Asthe head flag 124 of the second request is set, the storage device 150places the second request at the head 162_1 of the first queue 160.Thus, the controller 120 prevent read type requests with set head flagsfrom being processed out-of-order at the storage device 150 by holdingback a read type request with a set head flag at the device 200 if aread type request is currently at the head 162_1 of the first queue 160of the storage device 150.

FIG. 4 is an example block diagram of a computing device 400 includinginstructions for setting a head flag of a request to a storage device.In the embodiment of FIG. 4, the computing device 400 includes aprocessor 410 and a machine-readable storage medium 420. Themachine-readable storage medium 420 further includes instructions 421,423, 425 and 427 for setting the head flag of the request to the storagedevice.

The computing device 400 may be, for example, a secure microprocessor, anotebook computer, a desktop computer, an all-in-one system, a server, anetwork device, a wireless device, or any other type of user devicecapable of executing the instructions 421, 423, 425 and 427. In certainexamples, the computing device 300 may include or be connected toadditional components such as memories, sensors, displays, etc.

The processor 410 may be, at least one central processing unit (CPU), atleast one semiconductor-based microprocessor, other hardware devicessuitable for retrieval and execution of instructions stored in themachine-readable storage medium 420, or combinations thereof. Theprocessor 410 may fetch, decode, and execute instructions 421, 423, 425and 427 to implement setting the head flag of the request to the storagedevice. As an alternative or in addition to retrieving and executinginstructions, the processor 410 may include at least one integratedcircuit (IC), other control logic, other electronic circuits, orcombinations thereof that include a number of electronic components forperforming the functionality of instructions 421, 423, 425 and 427.

The machine-readable storage medium 420 may be any electronic, magnetic,optical, or other physical storage device that contains or storesexecutable instructions. Thus, the machine-readable storage medium 420may be, for example, Random Access Memory (RAM), an ElectricallyErasable Programmable Read-Only Memory (EEPROM), a storage drive, aCompact Disc Read Only Memory (CD-ROM), and the like. As such, themachine-readable storage medium 320 can be non-transitory. As describedin detail below, machine-readable storage medium 320 may be encoded witha series of executable instructions for setting the head flag of therequest to the storage device.

Moreover, the instructions 421, 423, 425 and 427 when executed by aprocessor (e.g., via one processing element or multiple processingelements of the processor) can cause the processor to perform processes,such as, the process of FIG. 4. For example, the receive instructions421 may be executed by the processor 410 to receive a request to accessa storage device (not shown) from a host (not shown). The calculateinstructions 423 may be executed by the processor 410 to calculate apercentage of outstanding requests that are read type requests at aqueue of the storage device, if the received request is a read typerequest.

The compare instructions 425 may be executed by the processor 410 tocompare the calculated percentage to a threshold percentage, if thereceived request is the read type request. The set instructions 427 maybe executed by the processor 410 to set a head flag of the request andto output the request to the storage device, if the received request isthe read type request and the calculated percentage is less than thethreshold percentage. The storage device may store the request at a headof the queue if the head flag of the request is set. The head flag ofthe request may be reset if the request is not the read type requestand/or the calculated percentage is greater than or equal to thethreshold percentage. The storage device may store the request at a tailof the queue, if the head flag of the request is reset.

FIG. 5 is an example flowchart of a method 500 for setting a head flagof a request to a storage device. Although execution of the method 500is described below with reference to the device 100, other suitablecomponents for execution of the method 500 can be utilized, such as thedevice 200. Additionally, the components for executing the method 500may be spread among multiple devices (e.g., a processing device incommunication with input and output devices). In certain scenarios,multiple devices acting in coordination can be considered a singledevice to perform the method 500. The method 500 may be implemented inthe form of executable instructions stored on a machine-readable storagemedium, such as storage medium 420, and/or in the form of electroniccircuitry.

At block 510, the device 100 receives a request to access a storagedevice 150 from a host 140. Then, at block 520, the device 100determines if the received request is a read type request. Next, atblock 530, the device 100 calculates a percentage of outstandingrequests that are read type requests 126 based on the determination.

At block 540, the device 100 compares the calculated percentage 126 to athreshold percentage 122 based on the determination at block 520. Forexample, the device 100 may only compare the calculated percentage 126to the threshold percentage 122 at block 540, if the device 100determines at block 520 that the received request is the read typerequest. Thus, the device 100 may not compare the calculated percentage126 to the threshold percentage 122 if the device 100 determines thereceived request to not be the read type request, such as a writerequest.

At block 550, the device 100 sets or resets a head flag 124 of therequest based on the comparison at block 540. For example, the device100 may set the head flag 124 of the request if the comparison at block540 determines the calculated percentage 126 to be less than thethreshold percentage 122. Conversely, the device 100 may reset the headflag 124 of the request if the comparison at block 540 determines thecalculated percentage 126 to be greater than or equal to the thresholdpercentage 122. Further, the device 100 may reset the head flag 124 ofthe request if the determination at block 520 determines that thereceived request is not the read type request or the comparison at block540 does not occur.

Lastly, at block 560, the device 100 outputs the request to a queue 160of the storage device 150. The storage device 150 is to store therequest at a head 162_1 of the queue 160 if the head flag 124 is set. Onthe other hand, the storage device 150 is to store the request at a tail162 _(—) n or end of the queue 160 if the head flag 124 is reset.

According to the foregoing, examples of present techniques provide amethod and/or device for improving read request latency withoutsubstantially affecting write request latency. Thus, examples may allowfor read requests to be prioritized over write requests when apercentage of the outstanding requests that are read requests is below athreshold percentage.

1-15. (canceled)
 16. A device, comprising: an interface unit to receivea plurality of requests from a host; and a controller to output therequests to a first queue of a storage device, wherein: the controlleris to set a head flag of the requests if the requests are read types anda percentage of requests queued at the first queue that are read typesis less than a threshold percentage, the storage device is to store thefirst request at a head of the first queue if the head flag of the firstrequest is set, the controller is to reset the head flag of the requestsif the requests are not the read types or the percentage of requestsqueued at the first queue that are the read types is greater than orequal to the threshold percentage, and the storage device is to storethe first request at a position of the first queue based on optimizing anumber of requests per second that are processed if the head flag of thefirst request is reset.
 17. The device of claim 16, wherein thecontroller limits a number of requests at the first queue with the headflag set to a specified number.
 18. The device of claim 16, furthercomprising: a counter to count a first number of read types and a secondnumber of read type and non-read types outstanding at the first queue ofthe storage device, wherein the percentage is based on the first andsecond numbers, the counter is to increment the first number if thecontroller outputs the read type request to the first queue and toincrement the second number if the controller outputs at least one ofthe read type request and the non-read type request to the first queue,and the counter is to decrement the first number if the storage deviceoutputs a first type acknowledgment to the device to indicate that theread type request has left the first queue and to decrement the secondnumber if the storage device outputs at least one of the first typeacknowledgement and a second type acknowledgment to the device, thesecond type acknowledgment to indicate that the non-read type requesthas left the first queue.
 19. The device of claim 16, wherein, thecontroller is to reset the head flag of the first request if thepercentage of requests queued at the first queue that are read types isgreater than or equal to the threshold percentage, and the storagedevice is to store the first request at a tail of the first queue if thehead flag of the first request is reset.
 20. The device of claim 16,further comprising: a second queue to output to the storage device,wherein the controller is to receive a second request from the host, andthe controller is to output the second request to a tail of the secondqueue if the second request is not a read type request and the firstqueue has capacity to store only one additional request.
 21. The deviceof claim 20, wherein, the controller is to reset a head flag of thesecond request and to output the second request to the second queue ifthe second request is a read type request, the percentage of requestsqueued at the first queue that are read types is greater than or equalto the threshold percentage and the first queue has capacity to storeonly one additional request and the storage device is to store thesecond request at a tail of the first queue if the head flag of thesecond request is reset.
 22. The device of claim 20, wherein, thecontroller is to set a head flag of the second request and to output thesecond request to a head of the second queue if the second request isthe read type request and the head of the first queue holds the firstrequest that is the read type request, the controller is to output thesecond request to the storage device after the first request is outputfrom the head of the first queue of the storage device, if thepercentage of requests queued at the first queue that are read types isless than the threshold percentage, and the storage device is to storethe second request at a head of the first queue if the head flag of thesecond request is set.
 23. The device of claim 16, wherein thecontroller is to reset the head flag of the first request, if the firstrequest is not the read type request, and the storage device is to storethe second request at a tail of the first queue if the head flag of thesecond request is reset.
 24. A method, comprising: receiving a requestto access a storage device from a host; determining if the receivedrequest is a read type request; calculating a percentage of outstandingrequests that are read types based on the determination; comparing thecalculated percentage to a threshold percentage based on thedetermination; performing one of setting and resetting a head flag ofthe request based on the comparison; and outputting the request to aqueue of the storage device, wherein the storage device is to store therequest at a head of the queue, if the head flag is set, and the storagedevice is to store the request at a position of the queue based onoptimizing a number of requests per second that are processed, if thehead flag is reset.
 25. The method of claim 24, wherein the comparingcompares the calculated percentage to the threshold percentage if thedetermining determines the received request to be the read type request.26. The method of claim 25, wherein, the comparing does not compare thecalculated percentage to the threshold percentage if the determiningdetermines the received request to not be the read type request, thehead flag of the request is reset if the determining determines thereceived request is not the read type request, and the storage device isto store the request at a tail of the queue if the head flag is reset.27. The method of claim 24, wherein, the head flag of the request is setif the comparison determines the calculated percentage to be less thanthe threshold percentage, and the storage device is to store the requestat a tail of the queue if the head flag is reset.
 28. The method ofclaim 27, wherein, the head flag of the request is reset if thecomparison determines the calculated percentage to be greater than orequal to the threshold percentage, and the storage device is to storethe request at the head of the queue if the head flag is set.
 29. Anon-transitory computer-readable storage medium storing instructionsthat, if executed by a processor of a device, cause the processor to:receive a request to access a storage device from a host; calculate apercentage of outstanding requests that are read types at a queue of thestorage device, if the received request is a read type request; comparethe calculated percentage to a threshold percentage, if the receivedrequest is the read type request; and set a head flag of the request andoutput the request to the storage device, if the received request is theread type request and the calculated percentage is less than thethreshold percentage, wherein the storage device is to store the requestat a head of the queue, if the head flag of the request is set.
 30. Thenon-transitory computer-readable storage medium of claim 29, wherein,the head flag of the request is reset if at least one of the request isnot the read type request and the calculated percentage is greater thanor equal to the threshold percentage, and the storage device is to storethe request at a tail of the queue if the head flag of the request isreset.